package homework_04;

import java.util.Arrays;
import java.util.Scanner;

/**
 * 输出长度分别为5,4的double型二维数组的值
 */
public class Test_02 {
    public static void main(String[] args) {
        double[][] darr = getDarr();
        showDarr(darr);
    }

    public static double[][] getDarr(){
        double[][] darr = new double[5][4];
        Scanner sc = new Scanner(System.in);
        for(int i=0;i<darr.length;i++){
            for(int j=0;j<darr[i].length;j++){
                System.out.println("请输入第" + i + "行第" + j + "列的值" );
                darr[i][j] = sc.nextDouble();
            }
        }
        return darr;
    }

    public static void showDarr(double[][] darr){
        for(int i=0;i<darr.length;i++){
            System.out.println(Arrays.toString(darr[i]));
        }
    }
}
